package com.example.wanandroid.activity.welcome

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.example.wanandroid.activity.main.MainActivity
import com.example.wanandroid.databinding.ActivityWelcomeBinding
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch


class WelcomeActivity : AppCompatActivity() {
    private lateinit var binding: ActivityWelcomeBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityWelcomeBinding.inflate(layoutInflater)
        setContentView(binding.root)

//        lifecycleScope.launch {
//            delay(100)
//        }


        when (8) {
            0 -> {
                startActivity(Intent(this, MainActivity::class.java))
                finish()
            }

            1 -> MyTest.testRoom()
            2 -> MyTest.testHandler(this)
            3 -> MyTest.testRetrofit()
            4 -> MyTest.testBannerView(this, binding.root)
            5 -> MyTest.testOkHttpUtils()
            6 -> MyTest.testClockView(this, binding.root)
            7 -> MyTest.testPrefsProperty(this)
            8 -> MyTest.testCoroutine(this)
        }


    }
}